package com.shop.api;

import com.alibaba.fastjson.JSONObject;
import com.shop.base.BaseResponse;
import com.shop.member.inputDTO.UserLoginInputDTO;
import com.shop.member.inputDTO.UserRegisterDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created with IntelliJ IDEA.
 * User: 王瑞文
 * Date: 2020/9/6
 * Time: 16:59
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Api(tags = "用户登陆注册服务")
public interface LoginService {
    /**
     * 用户登陆
     * @param userLoginInputDTO
     * @return
     */
    @PostMapping("login")
    @ApiOperation("用户登陆")
    BaseResponse<JSONObject> userLogin(@RequestBody UserLoginInputDTO userLoginInputDTO);

    /**
     * 登陆发送注册验证码
     * @param phone
     * @return
     */
    @PostMapping("sendSms")
    @ApiOperation("登陆发送验证码")
    BaseResponse<JSONObject > sendSmd(@RequestParam("phone")String phone);

    /**
     * 用户注册
     * @param userRegisterDTO
     * @return
     */
    @PostMapping("Register")
    @ApiOperation("注册")
    BaseResponse<JSONObject > register(@RequestBody UserRegisterDTO userRegisterDTO);

    /**
     * 注册发送验证码
     * @param phone
     * @return
     */
    @PostMapping("registerSendSms")
    @ApiOperation("登陆发送验证码")
    BaseResponse<JSONObject > registerSendSms(@RequestParam("phone")String phone);


}
